**** Descriptive statistics in Appendix Table 1
** Meiying Li 5 August 2024

********************************************************************
use $mydata/meiyli/Sample_Unemp_NILF_Selfemp.dta
*** Year by country, use min, max 
*** N of indviduals of survey by country, use min & mean
keep if Sample_all_emp==1
egen tag = tag(dname cname) 
egen N_CY = total(tag), by(cname)
bysort dname cname: gen N_survey=_N
tabstat year , by(cname) s( min max)
tabstat  N_CY , by(cname) s(max )
tabstat   N_survey, by(cname) s( mean min  )

********************************************************************
*** min N by Female X tertiary X parent
clear
use $mydata/meiyli/Sample_Unemp_NILF_Selfemp.dta
keep if Sample_all_emp==1
bysort dname cname Female tertiary parent: gen N_survey_FTP=_N
tabstat   N_survey_FTP, by(cname) s( min )
********************************************************************


********************************************************************
*** mean, min, max number of children for mothers for country from survey-level (weighted)
clear
use $mydata/hook/Sample_Unemp_NILF_Selfemp.dta
keep if Sample_all_emp==1 &  Female ==1 & parent ==1
collapse (mean) Nchild_CY=nhhmem17 [aw = ppopwgt], by(dname cname)
tabstat Nchild_CY, by(cname) s(mean, min, max)
********************************************************************


